package com.zhoushihao.class0806;

import java.util.Scanner;

public class FindChar {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        int[] flag = new int[26];
        int[] arr = new int[26];
        int first = -1;
        for (int i = 0; i < str.length(); i++) {
            arr[str.charAt(i) - 'a']++;
            if(arr[str.charAt(i) - 'a'] > 1) {
                first = -1;
            }else{
                if(first == -1) {
                    first = str.charAt(i) - 'a';
                }
            }
        }
        if(first == -1) {
            System.out.println(first);
        }else {
            System.out.println((char)(first + 'a'));
        }

    }
}
